import React, { useState } from 'react';
import { Drawer } from 'antd';
import './index.css';
import { SettingFilled } from '@ant-design/icons';
function SetButton() {
  const [visible, setVisible] = useState(false);
  const showDrawer = () => {
    setVisible(true);
  };

  const onClose = () => {
    setVisible(false);
  };
  return (
    <div>
      <SettingFilled
        onClick={showDrawer}
        className="workflow-ui-setButton"
        title="设置"
      />
      <Drawer
        title="Basic Drawer"
        placement="right"
        onClose={onClose}
        open={visible}
        getContainer={false}
        style={{ position: 'absolute' }}
      >
        <p>Some contents...</p>
        <p>Some contents...</p>
        <p>Some contents...</p>
      </Drawer>
    </div>
  );
}

export default SetButton;
